package com.greenantmall.bean;

import java.io.Serializable;

import android.text.TextUtils;

public class UIGoods implements Serializable{
	private static final long serialVersionUID = -8888769924604469756L;
	
	private String mObjectId;
	private String mDescroption;
	private String mSpecs;
	// 折扣后的价格
	private double mPriceAfterDiscount;
	// 折扣前的价格
	private double mPriceBeforDiscount;
	private String mUnit;
	private String mPicUrl;
	private int mShowTag;
	private double mDiscount;
	private String mStepUnit;
	private double mStep;
	private boolean mPriceByWeight;
	private int mBuyedPeopleCount;
	private double mStock;
	private String mStoreId;
	
	public double getStock() {
		return mStock;
	}
	
	public void setStock(double stock) {
		this.mStock = stock;
	}
	
	public String getObjectId() {
		return mObjectId;
	}

	public void setObjectId(String objectId) {
		mObjectId = objectId;
	}

	public int getBuyedPeopleCount() {
		return mBuyedPeopleCount;
	}

	public void setBuyedPeopleCount(int buyedPeopleCount) {
		mBuyedPeopleCount = buyedPeopleCount;
	}

	public boolean isPriceByWeight()
    {
        return mPriceByWeight;
    }

    public void setPriceByWeight(boolean priceByWeight)
    {
        this.mPriceByWeight = priceByWeight;
    }

    public String getStepUnit()
    {
        return mStepUnit;
    }

    public void setStepUnit(String stepUnit)
    {
        mStepUnit = stepUnit;
    }

    public double getStep()
    {
    	if(!isPriceByWeight()) {
    		return 1;
    	}
        return mStep;
    }

    public void setStep(double stepPrice)
    {
        mStep = stepPrice;
    }

    public String getDescroptionAndSpecs() {
    	if(!TextUtils.isEmpty(getSpecs())) {
			return mDescroption + "(" + getSpecs() + ")";
		}
		return mDescroption;
	}
    
    public String getDescroption() {
		return mDescroption;
	}
	
	public void setDescroption(String descroption) {
		mDescroption = descroption;
	}
	
	public String getSpecs() {
		if(mSpecs == null) {
			return "";
		}
		return mSpecs;
	}
	
	public void setSpecs(String specs) {
		mSpecs = specs;
	}
	
	/**
	 * 折扣后的价格
	 */
	public double getPriceAfterDiscount() {
		return mPriceAfterDiscount;
	}
	
	public void setPriceAfterDiscount(double price) {
		mPriceAfterDiscount = price;
	}
	
	/**
	 * 折扣前的价格
	 */
	public double getPriceBeforeDiscount() {
		return mPriceBeforDiscount;
	}
	
	public void setPriceBeforeDiscount(double price) {
		mPriceBeforDiscount = price;
	}
	
	public String getUnit() {
		return mUnit;
	}
	
	public void setUnit(String unit) {
		mUnit = unit;
	}
	public String getPicUrl() {
		return mPicUrl;
	}
	
	public void setPicUrl(String picUrl) {
		mPicUrl = picUrl;
	}
	
	public int getShowTag() {
		return mShowTag;
	}
	public void setShowTag(int showTag) {
		mShowTag = showTag;
	}
	
	public double getDiscount() {
		return mDiscount;
	}
	
	public void setDiscount(double discount) {
		mDiscount = discount;
	}

	public String getStoreId() {
		return mStoreId;
	}

	public void setStoreId(String storeId) {
		mStoreId = storeId;
	}
}
